0c98a80fb232ad2a7f4ea23d0732ef4f106166bd,FredBoat/src/main/java/fredboat/command/moderation/ConfigCommand.java,ConfigCommand,setConfig,#Guild#TextChannel#Member#Message#String[]#,40
Before Change
TextUtils.replyWithName(channel, invoker, "`track_announce` is now set to `" + val + "`.");
EntityWriter.mergeGuildConfig(gc);
} else {
channel.sendMessage(invoker.getEffectiveName() + ": This value must be true or false.").queue();
}
} else if(key.equals("auto_resume")) {
if(val.equalsIgnoreCase("true") | val.equalsIgnoreCase("false")) {
gc.setAutoResume(Boolean.valueOf(val));
TextUtils.replyWithName(channel, invoker, "`auto_resume` is now set to `"+val+"`.");
EntityWriter.mergeGuildConfig(gc);
} else {
channel.sendMessage(invoker.getEffectiveName() + ": This value must be true or false.").queue();
}
} else {
channel.sendMessage(invoker.getEffectiveName() + ": Unknown key.").queue();
After Change
if(key.equals("track_announce")) {
if (val.equalsIgnoreCase("true") | val.equalsIgnoreCase("false")) {
gc.setTrackAnnounce(Boolean.valueOf(val));
TextUtils.replyWithName(channel, invoker, "`track_announce`" + MessageFormat.format(I13n.get(guild).getString("configSetTo"), val));
EntityWriter.mergeGuildConfig(gc);
} else {
channel.sendMessage(MessageFormat.format(I13n.get(guild).getString("confugMustBeBoolean"), invoker.getEffectiveName())).queue();
}
} else if(key.equals("auto_resume")) {
if(val.equalsIgnoreCase("true") | val.equalsIgnoreCase("false")) {
gc.setAutoResume(Boolean.valueOf(val));
TextUtils.replyWithName(channel, invoker, "`auto_resume`" + MessageFormat.format(I13n.get(guild).getString("configSetTo"), val));
EntityWriter.mergeGuildConfig(gc);
} else {
channel.sendMessage(MessageFormat.format(I13n.get(guild).getString("confugMustBeBoolean"), invoker.getEffectiveName())).queue();
}
} else {
channel.sendMessage(MessageFormat.format(I13n.get(guild).getString("configUnknownKey"), invoker.getEffectiveName())).queue();